package Task34;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            String str = scanner.next();
            String str1 = scanner.next();
            int count = 0;
            int i = 0;
            while (i < str.length()){
                int j = 0;
                while (j < str1.length() && i < str.length() && str.charAt(i) == str1.charAt(j)){
                    if( str1.charAt(j) != str.charAt(i)){
                        j--;
                        break;
                    }
                    i++;
                    j++;
                }
                if(j == str1.length()){
                    count++;
                }
                if(i < str.length() && str.charAt(i) != str1.charAt(0)){
                    i++;
                }
            }
            System.out.println(count);
        }
    }
}
